Skip to content

Add TM8b summaryVersion on MessageAnnotations - #482

Draft
AndyTWF wants to merge 1 commit into
mainfrom
summary-version
Draft

AndyTWF wants to merge 1 commit into
mainfrom
summary-version

Conversation

@AndyTWF

@AndyTWF AndyTWF commented May 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds summaryVersion to MessageAnnotations so SDKs surface an identifier for the summary itself, distinct from the referenced message's serial/timestamp/version.

Motivation

The existing fields on Message all refer to the message being annotated, not to the summary delivered alongside it. That leaves consumers with no way to:

  • order two successive summaries of the same referenced message, or
  • reason about when a particular summary was produced (as opposed to when the underlying message was published).

This is especially important because the summary version advances on every summary publish — including ones that produce an empty summary — so the version is the only reliable ordering signal for summary updates.

Changes

  • features.md:
    • New spec items TM8b, TM8b1, TM8b2, TM8b3 under MessageAnnotations.
    • IDL updated with summaryVersion: SummaryVersion? on MessageAnnotations and a new SummaryVersion class.
  • api-docstrings.md:
    • summaryVersion row added to MessageAnnotations.
    • New class SummaryVersion section with serial and timestamp.

TM8b3 is explicit that the SDK MUST populate summaryVersion from the wire when present (regardless of whether summary is empty) and MUST NOT synthesise a default when absent — leaving it unset (e.g. null) instead. This avoids SDKs inventing version identifiers that could collide or mislead consumers.

Test plan

  • Spec linter passes ((cd build && npm run lint)) — confirmed locally.
  • Reviewer confirms TM8b* IDs do not collide with any in-flight PRs.
  • IDL block matches the new spec items.

🤖 Generated with Claude Code

Successive annotation summaries on the same referenced message need an
identifier that is independent of the referenced message's `serial`,
`timestamp`, and `version` (which all refer to the message being
annotated, not to the summary). Without this, consumers cannot order
two summaries of the same message, or tell when a summary itself was
produced.

Introduces `MessageAnnotations.summaryVersion` (TM8b) and a new
`SummaryVersion` class with `serial` (TM8b1) and `timestamp` (TM8b2).
TM8b3 spells out that the SDK populates it from the wire when present
(including when `summary` is empty, since the version advances on
every summary publish) and must not synthesise a default when absent.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@SimonWoolf

Copy link
Copy Markdown
Member

@AndyTWF are you still looking to add this? I'm happy with the feature design but rn this is a spec pr for something that doesn't exist serverside, are you planning a serverside pr?

@AndyTWF

AndyTWF commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

@AndyTWF are you still looking to add this? I'm happy with the feature design but rn this is a spec pr for something that doesn't exist serverside, are you planning a serverside pr?

Eventually I would like to come back to it, just unfortunately not top of my list atm :( Happy to close this and re-open it again later when I've got the space to look at it

@SimonWoolf

Copy link
Copy Markdown
Member

fine to keep open but i'll convert it to draft until we have a serverside impl

@SimonWoolf
SimonWoolf marked this pull request as draft October 8, 2026 19:46

This branch was successfully deployed

1 active deployment
staging/pull/482 — 84cec0e4 Deployed May 26, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants